//自动图片评论
var time;
const imageArr = [
  '//img30.360buyimg.com/n1/s760x500_jfs/t17188/258/748561545/385413/42948846/5aa663f7N3b0043d8.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t19360/90/768499013/96345/9d7e7b04/5aa538f2N4391ff9a.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t16111/77/2325069505/162434/72001fc/5aa53213N19d6e87e.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t19567/347/708170556/73539/9c38d423/5aa11321N62483954.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t16306/19/2294392305/297498/7cc81938/5aa0a8c3N3fd0abc0.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t18400/73/638909230/39411/214b185f/5a9e38f6N13172e86.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t15628/85/2177691783/110829/b1c1f19b/5a9806b5Nb1cd797c.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t17494/138/524563219/165913/bfcc179d/5a8985c8Nba2724e9.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t14767/173/2249652486/101499/54828657/5a83e75eN8bc2e2a6.jpg',
  '//img30.360buyimg.com/n1/s760x500_jfs/t18994/89/798457060/284655/24dd84f1/5aa77650N42158426.jpg'
];
var randNum = Math.floor(Math.random() * (imageArr.length + 1))
var randImg = imageArr[randNum]

function a() {
  var close = document.getElementsByClassName('btn-9');
  if (close.length > 0) {
    close[0].click()
    var imgs = document.getElementsByName('imgs1')[0];
    if (imgs != null) {
      imgs.value = randImg;
      var submit = document.getElementsByClassName('btn-5 mr10 setcomment')[0];
      submit.click();
      time = setTimeout('a()', 5000)
    }
  } else {
    clearTimeout(time);
  }
};
a();
